﻿<common:UserControlBase x:Class="ExchangeTracker.Presentation.Views.SymbolMultiTabView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:common="clr-namespace:ExchangeTracker.Presentation.Common"
             xmlns:views="clr-namespace:ExchangeTracker.Presentation.Views"
             DataContext="{Binding Source={StaticResource Locator}, Path=SymbolMultiTabViewModel}"
             >
  <Grid>
    <TabControl Style="{x:Null}" x:Name="TabMenu" ItemsSource="{Binding MenuCommandObjects}" SelectedItem="{Binding CurrentTab}">
      <TabControl.ItemContainerStyle>
        <Style TargetType="TabItem">
          <Setter Property="HeaderTemplate">
            <Setter.Value>
              <DataTemplate>
                <StackPanel Orientation ="Horizontal">
                  <TextBlock Text="{Binding Key}" TextAlignment="Left" FontSize="{StaticResource FontSize0X}" Width="100"></TextBlock>
                  <Button Height="15" Width="15" Click="ButtonBase_OnClick">
                    <Button.Background>
                      <ImageBrush ImageSource="/ExchangeTracker.Presentation;component/Assets/1403270927_Close.png" />
                    </Button.Background>
                  </Button>
                </StackPanel>
              </DataTemplate>
            </Setter.Value>
          </Setter>
          <Setter Property="ContentTemplate">
            <Setter.Value>
              <DataTemplate>
                <ContentControl Content="{Binding Navigator}" />
              </DataTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </TabControl.ItemContainerStyle>
    </TabControl>
  </Grid>

</common:UserControlBase>
